<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box{
            width: 200px;
            margin: auto;
            height: 30px;
        }
        #warn{
            width: 200px;
            height: 40px;
            background-color: yellow;
            margin: auto;
            font-size: 12px;
            border: 1px solid black;
        }
    </style>
</head>
<body>
    <div id="box">
        <input type="checkbox" name="" id="">
        两周内自动登录
    </div>
    <div id="warn">
        为了您的信息安全，请不要在网吧或公共场合使用此功能
    </div>
</body>
<script>
    var box = document.getElementById('box')
    var warn = document.getElementById('warn')
    box.onmouseleave =function(){
        warn.style.display = "none"
    }
    box.onmouseenter =function(){
        warn.style.display = ""
    }
</script>
</html>